Script: --on windowEvent wdID,wdName,objNo,objName,objValue┬┬if objValue="Open" then ┬ get wsGet(wdID,"List2","Text")┬ if it ¡ empty then┬ wsSet wdID,"OK","Disabled", "false"┬ end if┬ ┬else if objValue="Close" then ┬ ┬else if objValue="Suspend" then ┬ ┬else if objValue="Resume" then ┬ ┬else if objValue="CloseBox" then ┬ ┬else if objValue="ZoomBox" then ┬ ┬else if objValue="GrowBox" then ┬ ┬else if objValue="TitleBar" then ┬ ┬end if┬┬--end windowEvent┬
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"List1","selectionText")┬put it into temp┬put NTFSqueezeText(temp,"A") into copyPick┬get wsGet(wdID,"List2","Text")┬put it into temp┬put NTFSqueezeText(temp,"A") into prevPick┬if prevPick=empty then -- don't compare┬ put copyPick into prevPick┬else┬ repeat with x=1 to (the number of lines in copyPick)┬ put line x of copyPick into picked┬ if TextToLineNum(picked,prevPick) = 0 then -- not there┬ put return & picked after prevPick┬ end if┬ end repeat┬end if┬if ((the number of lines of prevPick) >1) then┬ put NTFSqueezeText(prevPick,"A") into prevPick┬ -- sort prevPick┬end if┬wsSet wdID,"List2","Text",prevPick┬wsSet wdID,"List1","selectionText","" -- unhilite┬wsSet wdID,">> Copy >>","disabled","true"┬wsSet wdID,"OK","Disabled","false"┬--end mouseUp
ItemType: PUSH
Rect: 195,89,283,109
TextFont: Chicago
TextSize: 12
AutoSize: FALSE
Disabled: TRUE
Name: Remove
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"List2","selectionText")┬put it into removePick┬get wsGet(wdID,"List2","Text")┬put it into prevPick┬repeat with x=1 to (the number of lines of removePick)┬ put line x of removePick into picked┬ put TextToLineNum(picked,prevPick) into liner┬ if liner>0 then┬ delete line liner of prevPick┬ end if┬end repeat┬wsSet wdID,"List2","selectionText","" -- unhilite┬wsSet wdID,"List2","Text",prevPick┬wsSet wdID,"Remove","disabled","true"┬wsSet wdID,"OK","Disabled","false"┬--end mouseUp
ItemType: LIST
Rect: 8,33,185,178
TextSize: 10
Name: List1
DoubleClickItem: 1
KeyScroll: TRUE
Text: one┬two┬three
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"List1","selectionText")┬put it into thePick┬if thePick is not empty then┬ wsSet wdID,"List2","selectionText","" -- unhilite┬ wsSet wdID,">> Copy >>","disabled","false"┬ wsSet wdID,"Remove","disabled","true"┬else┬ wsSet wdID,">> Copy >>","disabled","true"┬end if┬--end mouseUp
ItemType: LIST
Rect: 291,33,468,178
TextSize: 10
Name: List2
DoubleClickItem: 2
Text:
Script: --on mouseUp wdID,wdName,objNo,objName,objValue┬get wsGet(wdID,"List2","selectionText")┬put it into thePick┬if thePick is not empty then┬ wsSet wdID,"List1","selectionText","" -- unhilite other list┬ wsSet wdID,"Remove","disabled","false"┬wsSet wdID,">> Copy >>","disabled","true"┬else┬ wsSet wdID,"Remove","disabled","true"┬end if┬--end mouseUp
ItemType: TEXT
Rect: 8,17,166,29
TextSize: 10
AutoSize: FALSE
Name: Title1
TextStyle: Bold
Text: Title1
ItemType: TEXT
Rect: 289,17,447,29
TextSize: 10
AutoSize: FALSE
Name: Title2
TextStyle: Bold
Text: Title2
ItemType: PUSH
Rect: 204,155,276,175
TextFont: Chicago
TextSize: 12
Disabled: TRUE
Name: OK
DefaultItem: TRUE
AutoClose: TRUE
ItemType: PUSH
Rect: 200,124,280,144
TextFont: Chicago
TextSize: 12
Name: cancel
AutoClose: TRUE
ItemType: LINE
Rect: 213,116,267,117
ItemType: TEXT
Rect: 1,0,451,15
AutoSize: FALSE
Name: instr
Text: Shift-click or command-click to select multiple continuous or discontinuous items, respectively